package com.neusoft;

import java.util.Date;

public class DemoStringBuilder {

	public static void main(String[] args) {
		/*
		 * StringBuilder和StringBuffter  都叫做字符串容器
		 * 默认容量:16
		 */
		StringBuilder sb = new StringBuilder("hello");
		sb.append(new Date());
		sb.append(true);
		sb.append(56);
		sb.append(56.2);
		sb.append('&');
		System.out.println(sb.capacity());
		System.out.println(sb.toString());
		System.out.println(sb.reverse());
	}
}
